//配置路由

import VueRouter from 'vue-router'

import HomeContainer from './comments/tabbar/HomeContainer.vue'
import MemberContainer from './comments/tabbar/MemberContainer.vue'
import ScopCarContainer from './comments/tabbar/ScopCarContainer.vue'
import SearchContainer from './comments/tabbar/SearchContainer.vue'
import NewsList from './comments/news/NewsList.vue'
import NewsInfo from './comments/news/NewsInfo.vue'
import PhotoList from './comments/photos/PhotoList.vue'
import PhotoInfo from './comments/photos/PhotoInfo.vue'
var router = new VueRouter({
    routes: [ //配置路由
        {
            path: '/',
            redirect: '/home'
        },
        {
            path: '/home',
            component: HomeContainer
        },
        {
            path: '/member',
            component: MemberContainer
        },
        {
            path: '/shopcar',
            component: ScopCarContainer
        },
        {
            path: '/search',
            component: SearchContainer
        },
        {
            path: '/home/newslist',
            component: NewsList
        },
        {
            path: '/home/newsinfo/:id',
            component : NewsInfo
        },
        {
            path: '/home/photolist',
            component : PhotoList
        },
        {
            path: '/home/photoinfo/:id',
            component: PhotoInfo
        }
    ],
    // 选中类名
    linkActiveClass: 'mui-active'
})

//将路由暴露全局
export default router